#ifndef   _MACRO_LogModule
#define   _MACRO_LogModule
#include <stdio.h>
#include <pthread.h>
#define   _LOG_BUFFSIZE  1024*1024*4
#define	  _LOG_PATH_LEN  250
#define   _LOG_MODULE_LEN 32

#define LOG_PRINT(...) log_print(__FILE__, __LINE__, __VA_ARGS__ )

typedef struct mr_log_s mr_log_t, *mr_log_p;

typedef  enum LogLevel {  
	LL_ERROR,
	LL_INFO,
	LL_WARNING,
	LL_TRACE,
	LL_NOTICE, 
	LL_DEBUG,
} LogLevel;

int mr_logger_init(mr_log_p *plog,LogLevel l, char *filelocation,size_t file_size,int console);
int mr_logger_write(mr_log_p plog, LogLevel l, const char* logformat,...);
int mr_logger_destroy(mr_log_p plog);
LogLevel mr_logger_get_level(mr_log_p plog);
#endif

